package com.fancy.mobileschool.entity;


/**
 * Created by Jackie on 2017/10/20.
 */
public class PersonChatMessage implements Comparable{

    public int id;

    public String person_from_id;

    public String person_to_id;

    public String content;

    public String time;

    public PersonChatMessage(int id, String person_from_id, String person_to_id, String content, String time) {
        this.id = id;
        this.person_from_id = person_from_id;
        this.person_to_id = person_to_id;
        this.content = content;
        this.time = time;
    }

    public PersonChatMessage(String person_from_id, String person_to_id, String content, String time) {
        this.person_from_id = person_from_id;
        this.person_to_id = person_to_id;
        this.content = content;
        this.time = time;
    }

    public PersonChatMessage() {
    }

    public void setPerson_from_id(String person_from_id) {
        this.person_from_id = person_from_id;
    }

    public void setPerson_to_id(String person_to_id) {
        this.person_to_id = person_to_id;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public void setOrder(int order) {
        this.id = order;
    }

    @Override
    public String toString() {
        return "PersonChatMessage{" +
                "id=" + id +
                ", person_from_id='" + person_from_id + '\'' +
                ", person_to_id='" + person_to_id + '\'' +
                ", content='" + content + '\'' +
                ", time='" + time + '\'' +
                '}';
    }

    public int compareTo(Object o) {
        PersonChatMessage personChatMessage = (PersonChatMessage) o;
        return this.id > personChatMessage.id ? 1 : -1;
    }
}
